package Thread;

/**
 * Created by pc on 4/11/16.
 */
public class InterruptionDemo {
    public static void main(String[] args) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                try {
                    Thread.sleep(9999);
                } catch (InterruptedException ex) {
                    System.out.println("I wake up");
                }

            }
        };
        thread.start();
        thread.interrupt();
    }
}
